﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/static/include/top.jsp"%>
<script>document.title="权限角色管理";</script>
<script type="text/javascript">
function openEditWin(id){
	openWin("修改详情","${baseURL}/role/edit?id="+id,600,500,xxx);
}

function openAddWin(){
	openWin("增加角色权限","${baseURL}/role/add",600,500,xxx);
}

function xxx(){
	location.reload(true);
}
</script>

<table>
	<tbody>

		<tr>
			<th><img src="${ctx}/static/images/pages/cen/rig/ico_01.png"
				align="absmiddle">&nbsp;权限角色管理</th>
		</tr>
		<tr class="tab_grey">
			<td>
				<form name="searchForm" action="" method="get">
					<input type="hidden" name="p" value="1" />
					角色名称： </span> <input id="authorName"
						type="text" name="authorName" value="${param['authorName']}" size="20"
						class="tab_textbut" />
					<a class="tab_but" href="#"
						onclick="searchForm.action='${baseURL}/role/list';searchForm.submit();return false;">查询</a>
					<a class="tab_but" href="#" onclick="clearInput();return false;">清空</a>
					<a class="tab_but" href="#"  onclick="openAddWin()">增加</a><br>
				</form>
				
				<script>
		$("#authorName").val("${param['authorName']}");
		
		function clearInput() {
			$("#authorName").val("");
		}
		</script> <iframe name="upload" width="0" height="0" frameborder="0"></iframe>
			</td>
		</tr>

	</tbody>
</table>



<br />
<c:if test="${empty obj.operationResult}">
	<b>没有符合条件的记录。</b>
</c:if>
<c:if test="${not empty obj.operationResult}">

	<table id="listTable">
	<tbody>
		<tr>
				<th width="15%">角色名称</th>
				<th width="60%">权限</th>
				<th>操作</th>
		</tr>
		<c:forEach var="oneRow" items="${obj.operationResult}">

			<tr>
				<td align="left" >${oneRow.authorName}</td>
				<td align="left" class="tab_td_rig">${oneRow.funcs}</td>
				<td align="left" ><a href="#"
					onclick="openEditWin('${oneRow.id}')"><img
						src="${baseURL}/static/images/tab/ico_01.png" width="16"
						height="16" border="0" align="absmiddle" />修改</a></td>
			</tr>
		</c:forEach>
		<tr class="tab_grey">
				<td colspan="7" align="center" valign="middle" class="tab_white">
				<div class="pagination"> 
					<%@ include file="../include/listpage.jsp"%>
				</div>
				<div class="clear"></div>
				</td>
			</tr>	
		
		</tbody>
	</table>
</c:if>

<%@ include file="/static/include/bottom.jsp"%>
